The present invention relates to a virtual machine system having a TLB (Translation Lookaside Buffer), and more particularly to an address Translator for such system.
The virtual machine system is a computer system which operates as if there were a plurality of computers under resources (processor, real storage, channel and I/O devices) of one real machine. In the virtual machine system (hereinafter VMS), a number of operating systems (OS's) can apparently simultaneously run on one real machine so that all resources including the main storage and the I/O devices as well as the processor are shared by the OS's. To this end, two operation modes, a privileged mode and a non-privileged mode in the real machine are utilized. Normally, the privileged mode is used for the OS operation mode, but in the VMS, the privileged mode is used as a special control program (which is referred to as a virtual machine control program (VMCP)) operation mode to operate the OS in the non-privileged mode. The plurality of virtual machines (hereinafter VM's) are simulated by the VMCP so that they are functionally equivalent to the real machine.
FIG. 2 shows a relationship between the address space and the address translation table when the OS executed on the VM adopts the virtual storage control.
In FIG. 2, when the OS executes a program on the virtual storage which the OS prepared, it translates the address by using a translation table which the OS controls to execute the program. However, where the OS is executed on the VM, the address which the OS on the VM translated is a virtual address when it is viewed from the VMCP and it is necessary for the VMCP to translate that address to an address on the real storage for execution. When the OS which carries out the virtual storage control is to be executed on the VM, a two-step address translation is necessary. The VMCP reduces the overhead therefor by use of a shadow table to improve the processing efficiency. The VMCP manages a table for translating the address on the virtual storage prepared by the OS directly to the address on the real storage. If either one of those two tables is modified, it must be reflected in the shadow table. The VMCP carries out this processing.
As disclosed in Japanese Unexamined Patent Publication No. 55-113182, in order to reduce the overhead of the VMCP to support the OS virtual storage, a segment table origin stack for realizing a multiple virtual storage system is provided, and a portion of segment table origin addresses for the OS or VMCP, space identifiers to constitute the multiple virtual storage and segment identifiers to identify the VM's are held in an entry of the stack, and a TLB is constructed to hold the space/segment identifiers read from the segment table origin stack as the segment identifiers. When the TLB is read, the corresponding space/segment identifier is compared with the space/segment identifier in the TLB entry to determine validity of the read-out TLB entry.
In this method, however, the necessary TLB entry may be invalidated because a common segment in the virtual machine cannot be determined.